package com.hxd.otc.common.enums;

public enum IdCardStatusEnum {

    Unverified(0, "未认证"), V1_Verified(1, "v1审核通过"), V1_Auditing(2, "v1审核中"), V1_AuthFaild(9, "v1审核不通过"),
    V2_Verified(11, "v2审核通过"), V2_Auditing(12, "v2审核中"), V2_AuthFaild(19, "v2审核不通过");

    private final int code;
    private final String desc;

    IdCardStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static IdCardStatusEnum getIDCardStatusEnum(int code) {
        switch (code) {
            case 0:
                return Unverified;
            case 1:
                return V1_Verified;
            case 2:
                return V1_Auditing;
            case 9:
                return V1_AuthFaild;
            case 11:
                return V2_Verified;
            case 12:
                return V2_Auditing;
            case 19:
                return V2_AuthFaild;
            default:
                return Unverified;

        }
    }
}
